﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetProveedorByRUC')
	BEGIN
		DROP  Procedure  GetProveedorByRUC
	END

GO

CREATE Procedure GetProveedorByRUC

	(
		@ruc char(11)
	)

AS

begin
SELECT
	[proveedor].[Contacto] AS 'Contacto',
	[proveedor].[Direccion] AS 'Direccion',
	[proveedor].[Email] AS 'Email',
	[proveedor].[IdProveedor] AS 'IdProveedor',
	[proveedor].[RazonSocial] AS 'RazonSocial',
	[proveedor].[Ruc] AS 'Ruc',
	[proveedor].[Telefono] AS 'Telefono',
	[proveedor].[TipoProveedor] AS 'TipoProveedor'
	FROM [dbo].[Proveedor] [proveedor]
	where [proveedor].[Ruc] = @ruc
end

GO


GRANT EXEC ON GetProveedorByRUC TO PUBLIC

GO


